#include "tcpclient.hpp"

#include <memory>

using namespace std;
using namespace client;
static void Usage(string proc) // 使用手册
{
    cout << "\nUsag:\n\t" << proc << "server_ip server_port\n\n";
}
int main(int argc, char * argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(Usage_ERR);
    }
    uint16_t serverport = stoi(argv[2]);
    string serverip = argv[1];
    unique_ptr<tcpclient> tcli (new tcpclient(serverip,serverport));
    tcli->initclient();
    tcli->start();
    return 0;
}